<template>
  <el-card shadow="hover" class="stat-card">
    <div class="icon-wrap">
      <el-icon :size="32">
        <component :is="icon" />
      </el-icon>
    </div>
    <div class="stat-value">{{ value }}</div>
    <div class="stat-label">{{ label }}</div>
  </el-card>
</template>

<script setup>
defineProps({
  icon: String,
  label: String,
  value: [String, Number]
})
</script>

<style scoped>
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border-radius: 14px;
}
.icon-wrap {
  margin-bottom: 10px;
}
.stat-value {
  font-size: 2rem;
  font-weight: bold;
}
.stat-label {
  color: #7a7a7a;
  margin-top: 4px;
  font-size: 14px;
}
</style>
